package model.common;

import java.util.Date;
import java.util.UUID;

/**
 * @Description: TODO
 * @author: april
 * @date: 2021年11月25日 15:46
 */
public class Entity {
    private String id;
    private Date createTime;
    private Date deleteTime;
    /* 删除状态 0已删除，1正常。默认值1 */
    private String isDel="1";


    /**
     * 通用唯一识别码，是由一组32位数的16进制数字所构成
     * 总共有 2^ 128个数字，大概是3.4 * 10^38个
     * 特点：不会重复
     * 举例：550e8400-e29b-41d4-a716-446655440000
     * @return 返回一个UUID字符串，不含连接符-
     */
    public static String getUUID() {
        return UUID.randomUUID().toString().replace("-", "");
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getDeleteTime() {
        return deleteTime;
    }

    public void setDeleteTime(Date deleteTime) {
        this.deleteTime = deleteTime;
    }

    public String getIsDel() {
        return isDel;
    }

    public void setIsDel(String isDel) {
        this.isDel = isDel;
    }
}
